package com.demo.servlet.demo;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @author ddone
 * @date 2024/3/16-20:46
 */
public class TestServletListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {
        // 上下文创建时 该方法调用
        System.out.println("上下文创建时 该方法调用");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("容器销毁时,该方法调用");
    }
}
